import React from 'react';
import Show from "./showMsg";
//let web3 = require('./utils/initweb3')
//let contractInstance = require('./eth/lotteryInstance')
class App extends React.Component{
    constructor(){
        super()
        this.state = {
            admin:'kkkk',
            name:'jack',
            address: '西安'
        }
    }
    componentDidMount(){

    }
    async componentWillAmount(){
        //let myadmin =  await contractInstance.methods.admin().call()
        this.setState({
            name:'jack',
            admin:'admin'
        })
    }
    render() {
        return (
            <div>
                <Show name ={this.state.name} admin = {this.state.admin}/>
                <p>address = {this.state.address}</p>
            </div>
        );
    }
}
export default App;